<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link href="" rel="stylesheet">
    <link rel="stylesheet" href="../assets/plugins/layui/css/layui.css" media="all" />
</head>

<body>
  <div class="admin-main">
    <blockquote class="layui-elem-quote layui-quote-nm">
        <a class="layui-btn layui-btn-sm layui-btn-normal J_iframe_dialog" href="javascript:;" data-url="./add.html" data-title="添加应用">
            <i class="layui-icon">&#xe608;</i> 添加应用
        </a>
        <a class="layui-btn layui-btn-sm layui-btn-normal J_iframe_dialog" href="javascript:;" data-url="./add-module.html" data-title="添加模块">
            <i class="layui-icon">&#xe608;</i> 添加模块
        </a>
    </blockquote>
    <div id="table_cont" style="padding: 10px;"></div>
  </div>
</body>
<script type="text/javascript" src="../assets/plugins/layui/layui.js"></script>
<script type="text/javascript">
function del(row) {
    alert(row)
}
var treeData;
var layout = [
    { name: '名称', treeNodes: true, headerClass: 'value_col', colClass: 'value_col', style: '' },
    { name: '系统编码', field: 'code', headerClass: 'value_col', colClass: 'value_col', style: ''},
    { name: 'serviceId', field: 'serviceId', headerClass: 'value_col', colClass: 'value_col', style: ''},
    {
        name: '操作',
        headerClass: 'value_col',
        colClass: 'value_col',
        style: 'width: 20%',
        render: function(row) {
            return "<a class='layui-btn layui-btn-danger layui-btn-sm' onclick='del(" + row + ")'><i class='layui-icon'>&#xe640;</i> 删除</a>"; //列渲染
        }
    },
];

layui.config({
	  version: '20190612',
	  base : '/assets/js/'
	});
layui.use(['form', 'treetable', 'layer','jeesuitelayui'], function() {
    var form = layui.form, $ = layui.jquery,jeesuitelayui = layui.jeesuitelayui;
	jeesuitelayui.ajax('/admin/app/tree','GET',null,function(data){
		treeData = data;
	},false);
    var tree1 = layui.treetable({
        elem: '#table_cont', //传入元素选择器
        checkbox: false,
        nodes: treeData,
        layout: layout
    });

    form.render();
});

    

</script>

</html>